//
//  SportDetailCell.m
//  StormWatch
//
//  Created by 王岩 on 2024/9/14.
//

#import "SportDetailCell.h"

@implementation SportDetailCell

- (void)setModel:(SportDetailModel *)model {
    self.nameLab.text = model.name;
    self.timeLab.text = model.timeHMSStr;
    self.sportTimeLab.text = jy_formatTimeFromDuration(model.sportTime.longLongValue);
    
    
    self.balanceLab.attributedText = [SWTool attS1:[NSString stringWithFormat:@"%.3f",model.distanceValue.longLongValue / 1000.0] s2:SWString(@"Km") f1:S_bfont(14) c1:[UIColor blackColor] f2:S_font(14) c2:S_HexColor(@"0x777777")];
    self.stepLabv.attributedText = [SWTool attS1:model.stepValue s2:SWString(@"Step") f1:S_bfont(14) c1:[UIColor blackColor] f2:S_font(14) c2:S_HexColor(@"0x777777")];
    self.caloLab.attributedText = [SWTool attS1:[NSString stringWithFormat:@"%.3f",model.caloValue.longLongValue / 1000.0] s2:SWString(@"Kcal") f1:S_bfont(14) c1:[UIColor blackColor] f2:S_font(14) c2:S_HexColor(@"0x777777")];
    self.heartLab.attributedText = [SWTool attS1:model.rateValue s2:SWString(@"BPM") f1:S_bfont(14) c1:[UIColor blackColor] f2:S_font(14) c2:S_HexColor(@"0x777777")];
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = 0;
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
